//
// Created by Bili_TianX_Computer on 2021/7/10.
//

#ifndef SUPERMARKETMANAGESYSTEM_ADMINUSERMANAGEDIALOG_H
#define SUPERMARKETMANAGESYSTEM_ADMINUSERMANAGEDIALOG_H

#include <QWidget>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QFormLayout>
#include <QTableWidget>
#include <QCheckBox>
#include <QPushButton>
#include <QInputDialog>
#include <QLineEdit>
#include <QDebug>
#include <QDialog>
#include <QMessageBox>
#include <QDialogButtonBox>
#include "../../data/ProductDataManager.h"
#include "../../data/UserDataManager.h"
#include "AddUserDialog.h"

class UserManageDialog : public QDialog
{
Q_OBJECT
public:
    QTableWidget *userTable;
    QPushButton *addButton;
    QPushButton *removeButton;
    QHBoxLayout *buttonLayout;
    QVBoxLayout *widgetLayout;
    int selectedRow;

    UserManageDialog();

    void addUserToTable(const User &user);

    User getUserFromTable(int row) const;

public slots:

    void addButtonClicked();

    void removeButtonClicked();

    void tableSelectRowSlot();
};


#endif //SUPERMARKETMANAGESYSTEM_ADMINUSERMANAGEDIALOG_H
